package com.dhwl.hsh.lib.api;

import com.dhwl.hsh.lib.bean.HttpResponse;
import com.dhwl.hsh.lib.bean.req.AddTaskReq;
import com.dhwl.hsh.lib.bean.resp.TaskResp;

import retrofit2.http.Body;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import rx.Observable;

/**
 * 任务相关接口
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016-04-18 17:48
 */
public interface TaskApi {
    /**
     * 发布任务
     *
     * @param requestBody
     * @return
     */

    @Headers({"Content-type:text/json; charset=UTF-8"})
    @PUT("taskAction/task")
    Observable<HttpResponse<TaskResp>> addTask(@Body AddTaskReq requestBody);

    /**
     * 计算总价
     *
     * @param requestBody
     * @return
     */
    @Headers({"Content-type:text/json; charset=UTF-8"})
    @POST("taskAction/costMoney")
    Observable<HttpResponse<String>> costMoney(@Body AddTaskReq requestBody);


}
